package com.ruoyi.disasterassessment.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.disasterassessment.mapper.DisasterAssessmentModelMapper;
import com.ruoyi.disasterassessment.domain.DisasterAssessmentModel;
import com.ruoyi.disasterassessment.service.IDisasterAssessmentModelService;

/**
 * 安全评估模型Service业务层处理
 * 
 * @author hcc
 * @date 2023-12-20
 */
@Service
public class DisasterAssessmentModelServiceImpl implements IDisasterAssessmentModelService 
{
    @Autowired
    private DisasterAssessmentModelMapper disasterAssessmentModelMapper;

    /**
     * 查询安全评估模型
     * 
     * @param id 安全评估模型主键
     * @return 安全评估模型
     */
    @Override
    public DisasterAssessmentModel selectDisasterAssessmentModelById(Long id)
    {
        return disasterAssessmentModelMapper.selectDisasterAssessmentModelById(id);
    }

    /**
     * 查询安全评估模型列表
     * 
     * @param disasterAssessmentModel 安全评估模型
     * @return 安全评估模型
     */
    @Override
    public List<DisasterAssessmentModel> selectDisasterAssessmentModelList(DisasterAssessmentModel disasterAssessmentModel)
    {
        return disasterAssessmentModelMapper.selectDisasterAssessmentModelList(disasterAssessmentModel);
    }

    /**
     * 新增安全评估模型
     * 
     * @param disasterAssessmentModel 安全评估模型
     * @return 结果
     */
    @Override
    public int insertDisasterAssessmentModel(DisasterAssessmentModel disasterAssessmentModel)
    {
        return disasterAssessmentModelMapper.insertDisasterAssessmentModel(disasterAssessmentModel);
    }

    /**
     * 修改安全评估模型
     * 
     * @param disasterAssessmentModel 安全评估模型
     * @return 结果
     */
    @Override
    public int updateDisasterAssessmentModel(DisasterAssessmentModel disasterAssessmentModel)
    {
        return disasterAssessmentModelMapper.updateDisasterAssessmentModel(disasterAssessmentModel);
    }

    /**
     * 批量删除安全评估模型
     * 
     * @param ids 需要删除的安全评估模型主键
     * @return 结果
     */
    @Override
    public int deleteDisasterAssessmentModelByIds(Long[] ids)
    {
        return disasterAssessmentModelMapper.deleteDisasterAssessmentModelByIds(ids);
    }

    /**
     * 删除安全评估模型信息
     * 
     * @param id 安全评估模型主键
     * @return 结果
     */
    @Override
    public int deleteDisasterAssessmentModelById(Long id)
    {
        return disasterAssessmentModelMapper.deleteDisasterAssessmentModelById(id);
    }
}
